Conversation
185502b to
c1915cc
Compare
clinical-domain-agent/src/main/java/care/smith/fts/cda/DefaultTransferProcessRunner.java
Outdated
Show resolved
Hide resolved
|
|
||
| private static Deidentificator errorOnSecond(TransportBundle bundle) { | ||
| var first = new AtomicBoolean(true); | ||
| var callCount = new AtomicInteger(0); |
c829665 to
ca715ea
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1486 +/- ##
=========================================
Coverage 99.34% 99.34%
- Complexity 555 558 +3
=========================================
Files 127 127
Lines 1975 1996 +21
Branches 62 62
=========================================
+ Hits 1962 1983 +21
Misses 2 2
Partials 11 11
🚀 New features to boost your workflow:
|
eb98b03 to
01566b3
Compare
alexanderkiel
left a comment
There was a problem hiding this comment.
I also miss documentation about the new endpoint. Or is than generated via OpenAPI?
|
|
||
| private <T> Mono<T> handlePatientError( | ||
| String step, String patientId, Step stepEnum, Throwable e) { | ||
| logError(step, patientId, e); |
There was a problem hiding this comment.
The step string should come from the step enum.
| .flatMap(this::sendBundleForPatient, config.maxSendConcurrency) | ||
| .doOnNext(b -> status.updateAndGet(TransferProcessStatus::incSentBundles)) | ||
| .onErrorContinue((e, r) -> status.updateAndGet(TransferProcessStatus::incSkippedBundles)); | ||
| .doOnNext(b -> status.updateAndGet(TransferProcessStatus::incSentBundles)); |
There was a problem hiding this comment.
Why was the onErrorContinue removed here?
There was a problem hiding this comment.
The onErrorContinue was replaced by onErrorResume(... -> Mono.empty()) inside each per-patient method (selectDataForPatient, deidentifyForPatient, sendBundleForPatient). This converts errors to empty publishers before they reach the outer flux, making onErrorContinue at the flux level unnecessary.
This approach is also safer — onErrorContinue has well-known pitfalls where it doesn't work as expected with certain operators (e.g. flatMap), because it relies on operator-level support. onErrorResume is the more predictable pattern.
01566b3 to
33651d5
Compare
33651d5 to
55de5b2
Compare
Summary
GET /api/v2/process/status/{processId}/failed_patientsreturning patient IDs and error messages for failed transfersTransferProcessStatusvia afailedPatientslist (excluded from/statusJSON via@JsonIgnoreto keep status responses concise)incSkippedBundles()fromaddFailedPatient()for independent tracking of skipped bundles and error detailserrorOnSecondtest helpers to correctly error on exactly the 2nd call usingAtomicIntegerinstead ofAtomicBooleanCloses #1485